package com.lecture.springlecture.event.java;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//具体的事件监听器
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MailTaskFinishListener implements TaskFinishEventListener {

    private String email;

    @Override
    public void onTaskFinish(TaskFinishEvent event) {
        System.out.println("Send Email to " + email + " Task:" + event.getSource());
    }
}
